package com.cloud.order.controller;


import com.cloud.feign.entity.Order;
import com.cloud.order.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/order")
public class OrderController {

    @Autowired
    private OrderService orderService;

    /**
     * 根据id查询订单信息
     * @param orderId
     * @return
     */
    @GetMapping("/getOrder/{orderId}")
    public Order queryOrderById(@PathVariable("orderId") Long orderId) {
        return orderService.queryOrderById(orderId);
    }
}
